/*******************************************************************************
*  file    : qloggerconsoleappender.hpp
*  created : 01.05.2013
*  author  : 
*******************************************************************************/

#ifndef QLOGGERCONSOLEAPPENDER_HPP
#define QLOGGERCONSOLEAPPENDER_HPP

#include "qloggerconf.hpp"
#include "qloggerappender.hpp"
#include "qloggerevent.hpp"
#include <QSharedPointer>

class QLOGGER_DECL QLoggerConsoleAppender : public QLoggerAppender
{
    public:
        FILE *stream_;
        QSharedPointer<QTextStream> out_;

    public:
        void write (const QLoggerEvent &event);
        void setCodec(QTextCodec* c);
        QLoggerConsoleAppender (int level, FILE *stream,
                                const QString &format,
                                const QString& time_format = "yyyy.MM.dd hh:mm:ss.zzz");
};

#endif // QLOGGERCONSOLEAPPENDER_HPP
